$(document).ready(function () {
    $("#topButton").click(function () {
        var keyword = $("#topInput").val();
        if (keyword = null || keyword == "") {
            alert("请输入你要检索的内容!");
            return false;
        }
    });

    var bd = document.getElementsByClassName("bd")[0];
    var bd_ul = document.getElementById("bd_ul");
    var bd_time;

    function bdplay() {
        bd_time = setInterval(function () {
            var bd_left = parseFloat(bd_ul.style.left) - 0.2;
            bd_ul.style.left = bd_left + "px";
            if (bd_left < -960) {
                bd_ul.style.left = -310 + "px";
            }
        }, 1);
    }

    function bdstop() {
        clearInterval(bd_time);
    }
    bd.onmouseover = function () {
        bdstop();
    }
    bd.onmouseout = function () {
        bdplay();
    }
    bdplay();
    console.log(bd_ul);
});